# Contributor: Angelo Verlain <hey@vixalien.com>
# Maintainer: Angelo Verlain <hey@vixalien.com>
pkgname=uxplay
_gitname=UxPlay
pkgver=1.70
pkgrel=0
arch="all"
url="https://github.com/FDH2/$_gitname"
pkgdesc="AirPlay Unix mirroring server"
license="GPL-3.0-or-later"
depends="
	gst-plugins-good
	gst-plugins-bad
	gst-libav
	"
makedepends="
	cmake
	openssl-dev
	libplist-dev
	avahi-dev
	gstreamer-dev
	gst-plugins-base-dev
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz
	uxplay.desktop
	"
options="!check"

builddir="$srcdir/$_gitname-$pkgver"

build() {
	cmake -B build
	cmake --build build
}

package() {
	install -Dm755 "$builddir/build/uxplay" "$pkgdir/usr/bin/uxplay"
	install -Dm644 "$srcdir/uxplay.desktop" "$pkgdir/usr/share/applications/uxplay.desktop"
	install -Dm644 "$builddir/uxplay.1" "$pkgdir/usr/share/man/man1/uxplay.1"
}

sha512sums="
219228643e9ffae663f1804d1673226568619302a81aa24c242fef40442c1c996b0e20da85daaf0fa5e791ccc08861bf75e15de369d230ffdc37b084523ff83c  uxplay-1.70.tar.gz
113ff76fa2761df54ec610f2ae2cdfc50ee6489102e82d2157c61d25b78e381406db94a3e1f119f4d8acd5fc34be3e97e56a693e3fc77086b42a67ca3168da17  uxplay.desktop
"
